package com.product.to;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
@Schema(title = "登录用户To")
public class LoginUserTo {
    @NotBlank(message = "用户名不能为空")
    @Schema(title = "用户名", requiredMode = Schema.RequiredMode.REQUIRED)
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 16, message = "密码长度为6-16位")
    @Schema(title = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String password;
}
